import java.util.Objects;

public class Card {
    private String point;//点数
    private String type;//花色
    private int value;
    private int typeValue;
    private String name="";

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Card(String point, String type, int value, int typeValue, String name) {
        this.point = point;
        this.type = type;
        this.value = value;
        this.typeValue = typeValue;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public int getTypeValue() {
        return typeValue;
    }

    public void setTypeValue(int typeValue) {
        this.typeValue = typeValue;
    }

    public Card(String point, String type, int value, int typeValue) {
        this.point = point;
        this.type = type;
        this.value = value;
        this.typeValue = typeValue;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public Card() {
    }

    public Card(String point, String type, int value) {
        this.point = point;
        this.type = type;
        this.value = value;
    }

    public Card(String point, String type) {
        this.point = point;
        this.type = type;
    }

    public String getPoint() {
        return point;
    }

    public void setPoint(String point) {
        this.point = point;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public String toString() {

        if (Objects.isNull(type)) {
            return point;
        }
        return type + point + " ";

    }
}
